<head>
{% init html_title = None %}
{% init _user_name = None %}
{% init FONT_SCALE = 100 %}
{% init show_menu  = True %}
{% init show_aside = False %}
{% init show_search = True %}
{% import xconfig %}

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{% if FONT_SCALE == 80 %}
  <meta name="viewport" content="width=device-width,initial-scale=0.8,maximum-scale=0.8,user-scalable=0"/>
{% elif FONT_SCALE == 120 %}
  <meta name="viewport" content="width=300,initial-scale=1.2,maximum-scale=1.2,user-scalable=0"/>
{% else %}
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=0"/>
{% end %}

<title>Xnote{%if html_title%} | {{T(html_title)}}{%end%}</title>

<link rel="shortcut icon" href="/static/favicon.ico"/>
<link rel="bookmark" href="/static/favicon.ico"/>
<link rel="stylesheet" href="/static/css/app.build.css"/>
<link rel="stylesheet" href="/static/css/common-card.css"/>

<script type="text/javascript">
  window.xuser = "{{_user_name}}";
  window.PAGE_OPEN = "{{xconfig.PAGE_OPEN}}";
  window.SHOW_ASIDE = "{{show_aside}}";
  window.THEME = "{{THEME}}";
</script>

<script type="text/javascript" src="/static/lib/jquery/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="/static/lib/layer/layer.js"></script>
<!-- 应用JS脚本,优先级更高，所以放在后面 -->
<script type="text/javascript" src="/static/js/app.build.js"></script>

{% if xconfig.RECORD_LOCATION %}
<script type="text/javascript" src="/system/stats"></script>
{% end %}

{# 自定义的样式 #}
{% if xconfig.USER_CSS != None %}
  <link rel="stylesheet" type="text/css" href="/system/user.css">
{% end %}

{# 自定义脚本 #}
{% if xconfig.USER_JS != None %}
  <script type="text/javascript" src="/system/user.js"></script>
{% end %}

{% block head %} {% end %}

{% if not show_menu %}
<style type="text/css">
  body {
    background: transparent;
  }
  .main {
    padding: 0px;
  }
  .nav {
    display: none;
  }
  .nav-left {
    display: none;
  }
  .x-body {
    left: 0px;
  }
</style>
{% end %}

{% if not show_search %}
  <style type="text/css">
    .nav-left-search {
      display: none;
    }
    .search-box {
      display: none;
    }
  </style>
{% end %}

{% if xconfig.DEBUG_HTML_BOX %}
  <!-- 用于移动端或者其他不方便调试设备的样式调试 -->
  <style type="text/css">
    * {
      box-sizing: border-box;
      border: solid 1px red;
    }
  </style>
{% end %}

{# 侧边栏(右侧)是否显示 #}
{% if not show_aside %}
  <style type="text/css">
    .x-body {
      right: 0px;
    }
    .aside {
      display: none;
    }
  </style>
{% end %}

</head>
